
<section id="content">
	

    <!-- Tableau obligatoire ! Structure du calendrier ! -->
    <table class="ds_box" cellpadding="0" cellspacing="0" id="ds_conclass" style="display: none;">
        <tr>
            <td id="ds_calclass"></td>
        </tr>
    </table>

    <!-- -->

	<h1 class="article">{if isset($animal)}{#MODIFIER#} {$animal->getPrenom()}{else}{#NOUVEL_ANIMAL#}{/if}</h2>

    <form id="formID" class="article buttons" name="formulaire" action="?action={if isset($animal)}modifierAnimal{else}ajouterAnimal{/if}" method="post" enctype="multipart/form-data">
        
        <input type="hidden" name="id" value="{if isset($animal)}{$animal->getId()}{/if}" />
        <fieldset class="form-text">
            <label>{#NOM_SPA#}<em>*</em></label>
            <input id="nom" class="validate[required,custom[onlyLetter],length[0,20]] text-input" type="text" name="nom" value="{if isset($animal)}{$animal->getNom()}{/if}" />
        </fieldset>

        <fieldset class="form-text">
            <label>{#DEUXIEME_NOM#}</label>
            <input type="text" name="secondNom" value="{if isset($animal)}{$animal->getSecondNom()}{/if}" id="nom2" 
            class="validate[optional,custom[onlyLetter],length[0,20]] text-input" />
        </fieldset>  

        <!-- Utiliser du javascipt et jquery pour lié les deux listes déroulantes pour avoir qqch d'évolutif-->

        <fieldset>
            <label>{#SEXE#}<em>*</em></label>
            <select name="sexe" value="{if isset($animal)}{$animal->getSexe()}{/if}" id="sexe" class="validate[required]" >
            	<option value="" selected="selected">---</option>
                <option value="Male">{#MALE#}</option>
                <option value="Femelle">{#FEMELLE#}</option>
                <option value="Indetermine">{#INDETERMINE#} </option>
            </select>
        </fieldset>  
        <fieldset>
            <label>{#TYPE_ANIMAL#}<em>*</em></label>
            <select name="TypeAnimal" onchange="{literal}showRaces(this.value){/literal}">
                <option value="" selected="selected">---</option>
                {section name="unType" loop=$typeAnimal}
                    <option value="{$typeAnimal[unType]->getNom()}">{$typeAnimal[unType]->getNom()}</option>
                {/section}
                
            </select>

        </fieldset>
        <fieldset>
            <label>{#COULEUR#}<em>*</em></label>
            	<select name="couleur" value="{if isset($couleur)}{$animal->getCouleur()}{/if}" id="couleur" class="validate[required]">
                <option value="" selected="selected">---</option>
                {html_options output=$listeCouleur values=$listeCouleur}
                
                </select>
        </fieldset>  
        <fieldset>
            <label>{#RACE#}<em>*</em></label>
            <select name="TypeRace" id="txtHint" >
            	
            </select>         
        </fieldset>
        <fieldset class="form-text break">
            <label>{#LONGUEUR_POIL#}</label>
            <input type="text" name="longueurPoil" value="{if isset($animal)}{$animal->getLongueurPoil()}{/if}" id="longueurPoil" 
            class="validate[optional,custom[onlyNumber],length[0,3]]" />
        </fieldset> 

        <fieldset class="form-text">
            <label>{#DATE_NAISSANCE#}</label>
            <input type="text" name="dateNaissance" onClick="ds_sh(this);" value="{if isset($animal)}{$animal->getDateNaissance()}{/if}" id="dateNaissance" 
            class="validate[optional,custom[date]] text-input"/>
        </fieldset>

        <fieldset class="form-text">
            <label>{#DATE_DECES#}</label>
            <input type="text" name="dateDeces" onClick="ds_sh(this);" value="{if isset($animal)}{$animal->dateDeces()}{/if}" id="dateDeces" 
            class="validate[optional,custom[date]] text-input"/>
        </fieldset> 

        <fieldset class="form-text">
            <label>{#NO_PUCE#}</label>
            <input type="text" name="puceNo" value="{if isset($animal)}{$animal->getPuceNo()}{/if}" id="puce" 
            class="validate[optional,custom[onlyNumber],funcCall[validate2fields],length[15,15]]"/>
        </fieldset>  
        <fieldset class="form-text">
            <label>{#IMPLANTATION#}</label>
            <select name="implantation" value="{if isset($animal)}{$animal->getimplantation()}{/if}" id="implantation" class="validate[optional,funcCall[validate2fields]]">
                <option value="">---</option>
                <option value="DejaImplantee">{#DEJA_IMPLANTE#}</option>
                <option value="ImplanteeSPA">{#IMPLANTE_SPA#}</option>
                <option value="PasPuce">{#PAS_PUCE#}</option>
            </select>
        </fieldset>  
        <fieldset class="form-text">
            <label>{#TATOUAGE#}</label>
            <input type="text" name="tatouage" value="{if isset($animal)}{$animal->getTatouage()}{/if}" id="tatouage" class="validate[optional]"/>
        </fieldset>  

        <fieldset class="form-text">
            <label>{#MEDAILLE#}</label>
            <input type="text" name="medaille" value="{if isset($animal)}{$animal->getMedaille()}{/if}" id="medaille" class="validate[optional]"/>
        </fieldset> 
        
        <fieldset class="image">
            <!-- opens directly to the camera (Android 3.0+) -->  
            <input type="file" name="photoProfil" accept="image/*;capture=camera" /> 
 
         </fieldset>

        <fieldset class="form-text long haut">
            <label>{#PARTICULARITES#}</label>
            <textarea name="remarque"rows="2" cols="50" value="{if isset($animal)}{$animal->getRemarque()}{/if}" id="particularites" class="validate[optional]"></textarea>
        </fieldset> 

        <fieldset class="form-actions">
            <input type="reset" name="Annuler" value="{#ANNULER#}" onclick="{literal};javascript:return confirm('{/literal}{#MESSAGE_ANNULER#}{literal}'){/literal}" />
    {if isset($animal)}<input type="submit" class="submit" name="modifierAnimal" value="{#MODIFIER#}" />{else}<input type="submit" class="submit" name="ajouterAnimal" value="{#ENREGISTRER#}" />{/if}
        </fieldset>

        


</form>



</section>
